﻿using BSChuangXu.Domain.User;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;

namespace BSChuangXu.Infrastructure
{
    /// <summary>
    /// 上下文
    /// </summary>
    public class BSDbContext : DbContext
    {

        public BSDbContext(DbContextOptions options) : base(options) { }
        /// <summary>
        /// 用户信息
        /// </summary>
        public DbSet<UserModel> Users { get; set; }
        /// <summary>
        /// 角色信息
        /// </summary>
        public DbSet<RoleModel> Roles { get; set; }
        /// <summary>
        /// 菜单信息
        /// </summary>
        public DbSet<MenuModel> Menus { get; set; }
        /// <summary>
        /// 用户角色信息
        /// </summary>
        public DbSet<UserRole> UserRoles { get; set; }
        /// <summary>
        /// 角色菜单信息
        /// </summary>
        public DbSet<RoleMenu> RoleMenus { get; set; }

    }
}